local skel = fk.CreateSkill {
  name = "emo__touzi",
  tags = {Skill.Permanent, Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["emo__touzi"] = "投资",
  [":emo__touzi"] = "持恒技，若你不为AI，游戏开始时，获得100金币；你使用或打出牌时，获得5金币；每轮开始时，花费金币购买<a href=':emo_talents'>“战法”</a>。",

  ["$emo__touzi1"] = "（咛）",
}

local EmoTalentUtil = require "packages.emopack.pkg.emopack_talent.util" -- 加载战法核心

skel:addEffect(fk.RoundStart, {
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(skel.name) and player.id > 0
  end,
  on_use = function (self, event, target, player, data)
    EmoTalentUtil:buyTalent(player)
  end,
})

skel:addEffect(fk.GameStart, {
  can_refresh = function (self, event, target, player, data)
    return player:hasSkill(skel.name) and player.id > 0
  end,
  on_refresh = function (self, event, target, player, data)
    EmoTalentUtil:addMoney(player, 100)
  end,
})

skel:addEffect(fk.CardUsing, {
  can_refresh = function (self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and player.id > 0
  end,
  on_refresh = function (self, event, target, player, data)
    EmoTalentUtil:addMoney(player, 5)
  end,
})

skel:addEffect(fk.CardResponding, {
  can_refresh = function (self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and player.id > 0
  end,
  on_refresh = function (self, event, target, player, data)
    EmoTalentUtil:addMoney(player, 5)
  end,
})

skel:addAcquireEffect(function (self, player)
  EmoTalentUtil:attachTalent(player)
end)

return skel
